#define _CRT_SECURE_NO_WARNINGS 1
 #include<stdio.h>
#include<math.h>
main()
{        int n = 1;
         int m = 0;
         float sum = 0.0f;
         float i = 0.0f;
         float PI = 0.0f;

         do
         {
                 i = pow(-1, m) * pow(n, -1);
                 n += 2;
                 m++;
                 sum += i;
         }while (fabs(i) >= 1.0e-6);
         PI = sum * 4;
         printf("PI = %f\n",PI);
         return 0;
 }
